package windbell.domain.risk.impl;

import edu.fudan.mylang.pf.BaseDAOService;
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.springframework.stereotype.Service;
import windbell.domain.risk.RiskCommonIssue;
import windbell.domain.risk.RiskCommonIssueDAO;
import windbell.domain.risk.RiskSubCategory;
import windbell.domain.risk.impl.RiskCommonIssueImpl;

@Service("windbell.domain.risk.RiskCommonIssueDAO")
public class RiskCommonIssueDAOImpl extends BaseDAOService<RiskCommonIssue> implements RiskCommonIssueDAO {
  public RiskCommonIssue create(final RiskSubCategory subCategory, final Procedure1<? super RiskCommonIssue> init) {
    RiskCommonIssue riskCommonIssue=RiskCommonIssueImpl.create(subCategory,getObjectFactory());
    
    final Procedure1<RiskCommonIssue> _function = new Procedure1<RiskCommonIssue>() {
        public void apply(final RiskCommonIssue it) {
          init.apply(it);
        }
      };
    RiskCommonIssue _doubleArrow = ObjectExtensions.<RiskCommonIssue>operator_doubleArrow(riskCommonIssue, _function);
    return _doubleArrow;
  }
}
